import {
  BaseEntity,
  Column,
  Entity,
  PrimaryColumn,
  PrimaryGeneratedColumn,
} from 'typeorm'

// 仓库信息表
@Entity({ name: 'warehouse' })
export class Warehouse extends BaseEntity {
  // 自增主键
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number

  // 仓库名称
  @PrimaryColumn({
    type: 'varchar',
    name: 'warehouseName',
  })
  warehouseName: string

  // 申请日期
  @Column({
    type: 'varchar',
    name: 'createdDate',
  })
  createdDate: string

  // 备注
  @Column({
    type: 'varchar',
    name: 'remark',
    nullable: true,
  })
  remark: string

  // 是否删除
  @Column({
    type: 'tinyint',
    name: 'isDelete',
    nullable: true,
  })
  isDelete: boolean
}
